home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
quirks.zip
/
QUIRKS.TXT
< prev
next >
Wrap
Text File
|
1989-04-24
|
62KB
|
1,382 lines
New items added 04/01/89 - 04/24/89
Part 1 - CHAIN (QB 4, QB 3, BASCOM 6)
TAB with REDIM (QB 4.50)
VAL (QB 4 & BASCOM 6)
Part 2 - BUILDRTM (BASCOM 6)
AB45ACVR.HLP and QB45ACVR.HLP (QB 4.50)
-------------------------------------------------------------------------
This file contains information about bugs, quirks, and general points
of interest to programmers working with compiled BASIC. It is divided
into four parts:
Part 1 - Description of bugs, quirks, etc.
Part 2 - General points of interest
Part 3 - Sample programs
Part 4 - Video adapters compatible with QB 4.50
If you want to find one of the above quickly, use your text editor to
search for the text shown above. i.e., Search for "Part 1 -".
As of 12/3/88, all new or changed entries will be marked with the date
that the information as added or changed. The date will appear in the
entry in the format (yy/mm/dd).
As of 2/8/89, all references to problems with QB4.00 and QB4.00a have
been removed from this file. It is presumed that all QB programmers
have upgraded either to QB4.50 or QB4.00b. If you are still using
QB4.00 or 4.00a, call Microsoft at 206-454-2030 and ask for a free
upgrade to 4.00b. If you are using BASCOM 6, there is a similar upgrade
available to BASCOM 6.00b.
This file is maintained by Mark Novisoff of MicroHelp, Inc. Much of the
information was contributed by members of MicroHelp's BASIC Users Group,
users of the MSSYS forum on Compuserve and users of Mach 2, Stay-Res,
The MicroHelp Toolbox and the QB/Pro Professional series.
If you have additional information that should be added, please send it
to:
Mark Novisoff
MicroHelp, Inc.
4636 Huntridge Drive
Roswell GA 30075
Compuserve ID 73047,3706 in MSSYS (Microsoft Systems Forum)
If possible, please include a *small* sample program that will demonstrate
the problem and cause it to happen whenever the program is run.
-------------------------------------------------------------------------
Part 1 - Description of bugs, quirks, etc.
-------------------------------------------------------------------------
Note: QB 4 under "Compilers" refers QB4.00b and 4.50.
` Next to a QB 4 entry indicates that the problem has been
fixed in QB 4.50 and/or the accompanying BC program.
Command/Error Compilers Description
-------------- --------------- --------------------------------------------
$INCLUDE QB 4 If you have a DEFINT statement in an include
file and you wish to use it within subprograms/
functions in a module, you must $INCLUDE it
within each sub/function structure. If you
simply include it in the mainline code, the
DEFINT statement is not recognized. However,
if you have a statement DEFINT in your mainline
code (as opposed to $INCLUDE), it will work ok.
BLOAD All In order to BLOAD a file, the file must have
been previously BSAVEd so that the 7 byte
"header" is present. Although it may be
possible to BLOAD files that were not saved
with this header, it is dangerous because
BASIC presumes that the header is there and
will not load the first 7 bytes into memory.
(89/03/31)
CALL (asm) QB 4 If you pass a static string array as a
parameter to a subprogram, and the string
array represents FIELDed data (as in a
random file), AND you call an assembly
subroutine that displays the data, your
position in the file can be wiped out!
See sample program #22. The fix is to place
the string array in a COMMON SHARED statement
and remove it from the parameter list.
Added (88/12/19). Even if the string array
is NOT a FIELDed array, the data can become
corrupt. The new solution is to move all
CALL or CALLS statements that have string
arrays as parameters to the MAIN program
and remove them from SUBs.
CALL QB 4 If you want to pass a single element from a
string array to a subprogram, be sure to put
an extra pair of parentheses around the
variable name in the parameter list. For
example, you may have a problem with:
CALL MySub(A,B,C$(3),D)
However, the following should work:
CALL MySub((A,B,(C$(3)),D)
CALL (asm) QB 4 Effective with QB 4, assembly
language subroutines must preserve
the SI and DI registers and make
sure the direction flag is cleared
before returning to BASIC.
In addition, you must not have a label name
after the END statement in your assembler code.
CALL INIT QB 2-3 Do not name a precompiled subprogram "INIT".
If you do, the compiler will go into never-
never land when your user library is loaded.
CALL vs GOSUB All If you have many calls to the same
asm routine or subprogram, you'll
use less memory if you set
variables and GOSUB to a routine
that performs the CALL instead of
having the CALL "in line". CALL is
much faster using variables than
using "literals".
CALLS QB 4 If you are passing string arrays to an
assembler subroutine, make sure that
$Static is in effect (not $Dynamic) when
you dimension your array. If
you do not, the data are not pushed onto
the stack correctly by BC. This affects
the use of MhBasStringSort in Mach 2.
CALLS QB 4 When CALLS (note the "S") is used and you
compile with "/D" (debug), the segment of
of a string element descriptor does not get
passed on the stack. In other words, if you
have an assembly language subroutine that
uses CALLS, you should not compile with "/d".
CHAIN QB 4, QB 3 & CHAIN and RUN will work correctly in DOS 2.1
BASCOM 6 when you compile with the BRUN library. They
will not work correctly on the second CHAIN
or run attemp if you compile with
the BCOM library (/O). You will get one of
the following errors: Out of memory, EXE
failure, or Error R6005. (89/04/24)
CINT QB 4 If the number you want to convert is exactly
halfway between two integers (i.e., .5), the
rounding is done incorrectly when the number
that would normally be the result is an odd
number. See example program #30. (89/01/03)
CIRCLE QB 4 The start and end angles must be
LESS than 2*pi. Previously they could
be less than or equal to.
CLEAR QB 4 If you use SETMEM to free up memory for
use by other routines or modules, the CLEAR
statement does not force the compiler to give
up that memory. In other words, you must
explicitly do a SETMEM(640*1024), or
other large number. (Also see RUN.)
Added 89/02/08: If you have an assembler
routine that has allocated memory from
the pool created by SETMEM (Mach 2's huge
string arrays, for example), using
SETMEM(640*1024) will still not release
the memory. That's because the underlying
program has may have done its own